package com.sun.talk

import com.sun.talk.netty.WebSocketServer
import com.sun.talk.utils.SpringUtils
import org.mybatis.spring.annotation.MapperScan
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
import org.springframework.boot.web.servlet.ServletComponentScan
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.scheduling.annotation.EnableAsync
import org.springframework.scheduling.annotation.EnableScheduling

@EnableAsync
@Configuration
@EnableScheduling
@SpringBootApplication(scanBasePackages = ["com.sun"])
@MapperScan(basePackages = ["com.sun.**.mapper"])
class TalkApplication

fun main(args: Array<String>) {
    runApplication<TalkApplication>(*args)
    WebSocketServer.start()
}
